package jym.tan.tmdb.bean.wrapper;

import java.io.Serializable;
import java.util.List;

import jym.tan.tmdb.bean.PersonSearch;
import jym.tan.tmdb.bean.Search;

import com.google.gson.annotations.SerializedName;

/**
 * The Class PersonSearchWrapper. The Wrapper class which holds the 
 * {@link List} of {@link PersonSearch} and other information.
 * <p>
 * 	The properties are:
 * 	<ul>
 * 		<li>page</li>
 * 		<li>results</li>
 * 		<li>total_pages</li>
 * 		<li>total_results</li>
 * 	</ul>
 * </p>	 
 * @author Tanmoy 
 */
public class PersonSearchWrapper extends Search implements Serializable {

	private static final long serialVersionUID = 6229041756472462332L;

	@SerializedName("results")
	private List<PersonSearch> results;
	
	/**
	 * Default Constructor.
	 */
	public PersonSearchWrapper() {
		
	}

	/**
	 * Gets the results.
	 *
	 * @return 
	 * 		The results
	 */
	public List<PersonSearch> getResults() {
		return results;
	}

	/**
	 * Sets the results.
	 *
	 * @param results 
	 * 		The new results
	 */
	public void setResults(List<PersonSearch> results) {
		this.results = results;
	}
	
	/* (non-Javadoc)
	 * @see jym.tan.tmdb.bean.Search#toString()
	 */
	@Override
	public String toString() {	
		StringBuilder builder = new StringBuilder();
		builder.append("{").
			append("page:").append(page).
			append(",").
			append("results:").append(results).
			append(",").
			append("total_pages:").append(totalPages).
			append(",").
			append("total_results:").append(totalResults).
			append("}");
		return builder.toString();
	}
}
